import request from '@/utils/request';

/**
 * 获取计划
 */
export function getPlan(params) {
  return request({
    url: 'api/plan/',
    method: 'get',
    params,
  });
}

/**
 * 提交计划
 */
export function addPlan(data) {
  return request({
    url: 'api/plan/',
    method: 'post',
    data,
  });
}

/**
 * 修改计划
 */
export function editPlan(data) {
  return request({
    url: 'api/plan/',
    method: 'put',
    data,
  });
}

/**
 * 删除计划
 */
export function del(data) {
  return request({
    url: 'api/plan/',
    method: 'delete',
    data,
  });
}

/**
 * 根据ID数组获取plan
 */
export function getByIds(params) {
  return request({
    url: 'api/plan/list',
    method: 'get',
    params,
  });
}
